import unittest
from glahf.glahf import _const

class ConstTest(unittest.TestCase):
    def setUp(self):
        self.C = _const()

    def test_change(self):
        with self.assertRaises(TypeError):
            self.C = _const()
            self.C.a = 1
            self.C.a = 2

    def test_del(self):
        with self.assertRaises(NameError):
            del self.C.a

if __name__ == '__main__':
    suite = unittest.TestLoader().loadTestsFromTestCase(ConstTest)
    unittest.TextTestRunner(verbosity=2).run(suite)
